StylusBox = {
	new = function (x1, y1, x2, y2)
		
		local pressed = function (self, x, y)
			if Stylus.newPress then
				if x > x1 and x < x2 and y > y1 and y < y2 then
					return true
				else
					return false
				end
			end
		end
		
		local hold = function (self, x, y)
			if Stylus.held then
				if x > x1 and x < x2 and y > y1 and y < y2 then
					return true
				else
					return false
				end
			end
		end
		
		local doubleClicked = function (self, x, y)
			if Stylus.doubleClick then
				if x > x1 and x < x2 and y > y1 and y < y2 then
					return true
				else
					return false
				end
			end
		end
		
		local clear = function (self)
			self = nil
		end
		
	return {
		pressed = pressed,
		hold = hold,
		doubleClicked = doubleClicked,
		clear = clear
	}
	
	end,
	
	simplePressed = function (bxx, bxy, bxx2, bxy2, x, y)
		if Stylus.newPress then
			if x > bxx and x < bxx2 and y > bxy and y < bxy2 then
				return true
			else
				return false
			end
		end
	end,
	
	simpleHold = function (bxx, bxy, bxx2, bxy2, x, y)
		if Stylus.held then
			if x > bxx and x < bxx2 and y > bxy and y < bxy2 then
				return true
			else
				return false
			end
		end
	end,
	
	simpleDoubleClicked = function (bxx, bxy, bxx2, bxy2, x, y)
		if Stylus.doubleClick then
			if x > bxx and x < bxx2 and y > bxy and y < bxy2 then
				return true
			else
				return false
			end
		end
	end
}